{% extends "base.html" %}

{% block content %}
<h2>欢迎来到学生管理系统～</h2>
<!--{{ students }}-->
<!--用表格展示数据-->
<table>
    <thead>
        <tr>
            <th>学号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {% for stu in students %}
        <tr>
            <td>{{ stu.sid }}</td>
            <td>{{ stu.name }}</td>
            <td>{{ stu.age }}</td>
            <td>{{ stu.gender }}</td>
            <td>
                <a href="/change/{{ stu.sid }}">修改</a> |
                <a href="/delete/{{ stu.sid }}">删除</a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}

